function selectAllOptions( cb, selName )
{
var f = cb.form;
var sel = f.elements[selName];

var opt, i = 0;
while( opt = sel.options[i++] )
{
opt.selected = cb.checked;
}
}